package com.ruoxi.blog.test;

import java.util.Scanner;

public class Main {
		public static void main(String[] args) {
				Scanner sc = new Scanner(System.in);
				while(sc.hasNextLine()){
						int t = Integer.parseInt(sc.nextLine());
						for (int i = 0; i < t; i++) {
								String param = sc.nextLine();
								StringBuilder stringBuilder = new StringBuilder(param);
								int mei = 0; int niu = 0;int count = 0;
								while (stringBuilder.length()>0){
										int temp = 0;int max = 0;int beginIndex = -1;int tempIndex = -1;
										for (int j = 0; j < stringBuilder.length(); j++) {
												if(stringBuilder.charAt(j) == '1'){
														temp++;
														if(tempIndex==-1){
																tempIndex=j;
														}
												}
												if(stringBuilder.charAt(j) == '0' || j==stringBuilder.length()-1){
														if (max<temp){
																beginIndex = tempIndex;
														}
														max = Math.max(max,temp);
														temp = 0;
														tempIndex = -1;
												}
										}
										if(max == 0)break;
										count++;
										if(count%2==1){
												mei += max;
										}else {
												niu += max;
										}
										stringBuilder.delete(beginIndex,beginIndex+max);
								}
								if(mei > niu){
										System.out.println("Niumei");
										System.out.println(mei-niu);
								}else if(mei < niu){
										System.out.println("Niuniu");
										System.out.println(niu-mei);
								}else {
										System.out.println("Draw");
								}
						}
				}
		}
}
